/***********************************************************
 
 File name: AABaseButton.m
 Author:    xuwei
 Description:
 按钮的基类：主要针对圆角红色的按钮
 
 2018/02/28: Created
 
 ************************************************************/

#import "AABaseButton.h"

@implementation AABaseButton
+ (instancetype)buttonWithType:(UIButtonType)buttonType {
    AABaseButton *buton = [super buttonWithType:buttonType];
    [buton setBackgroundColor: [UIColor colorWithHexString:kLikeRedColor]];
    
    [buton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    buton.titleLabel.font = [UIFont systemFontOfSize:kTextFontSize16];
    
    buton.layer.cornerRadius = 6;
    buton.layer.masksToBounds = YES;
    return buton;
}

- (instancetype)init {
    if (self = [super init]) {
        [self setBackgroundColor: [UIColor colorWithHexString:kLikeRedColor]];
        
        [self setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        self.titleLabel.font = [UIFont systemFontOfSize:kTextFontSize16];
        
        self.layer.cornerRadius = 6;
        self.layer.masksToBounds = YES;
    }
    return self;
}

@end
